<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <title>{{ title }}</title>
</head>
<body>
<div class="container">
    <div class="row">

        <div class="col-md-12 col-sm-12"><h3 class="text-center text-info">设备巡检</h3></div>

    </div>
    <div class="row">

        <div class="col-md-12 col-sm-12">
            <form class="form-horizontal" role="form" method="post" action="{% url "dev_post" %}">
                {% csrf_token %}
                <div class="form-group">
                    <input type="hidden" name="device_id" value="{{ device.id }}">
                    <div class="col-sm-10 control-label">
                        <label class="col-sm-2 label-warning  text-muted">名称：{{ device.name }}</label>
                        <span class="col-sm-10 label-info">位置：{{ device.desc }}</span>
                    </div>
                </div>
                <div class="form-group">
                    <label for="firstname" class="col-sm-2 control-label">工号</label>
                    <div class="col-sm-10">
                        <input type="number" class="form-control" id="employee_id" name="employee_id" placeholder="工号">
                    </div>
                </div>
                <div class="form-group">
                    <label for="lastname" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-10">
                        <input type="number" class="form-control" id="lastname" placeholder="密码" name="password">
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">结果</label>
                    <div class="col-sm-10">
                        <select name="devicestatus" id="" class="form-control">
                            {% for status in devicestatus %}
                                <option value="{{ status.id }}">{{ status.name }}</option>

                            {% endfor %}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary">提交</button>
                    </div>
                </div>
                {% if error %}
                    {{ error }}
                {% endif %}
            </form>
        </div>

    </div>

</div>
</body>
</html>